package org.example.fault.tolerant;

import lombok.extern.slf4j.Slf4j;
import org.example.model.RpcResponse;

import java.util.Map;

/**
 * @Title: FailSafeTolerantStrategy
 * @Author: kunliangzhao
 * @Package org.example.fault.tolerant
 * @Date: 2025/6/23 15:56
 * @Description: 静默处理，记录日志
 */
@Slf4j
public class FailSafeTolerantStrategy implements TolerantStrategy {

    @Override
    public RpcResponse doTolerant(Map<String, Object> context, Exception e) {
        // 记录日志
        log.info("静默处理异常",e);
        return new RpcResponse();
    }
}
